<include file="../Public/header" />
<script data-main="__PUBLIC__/admin/js/page/cms/site/addsite" src="__PUBLIC__/admin/js/lib/requirejs/require.js"></script>
</head>
<body>
  <div class="page">
    <div class="page-hd">
      <h1><notempty name="siteid">修改站点<else/>添加站点</notempty></h1>
    </div>
    <div class="form">
      <form action="{:URL('cms/Site/doaddsite')}" method="POST" id="J_form">
        <input type="hidden" name="siteid" id="siteid" value="{$siteid}" />
        <dl class="kv">
          <dt>
            <label>站点名称：</label>
          </dt>
          <dd>
            <input class="input-text" type="text" name="name" id="name" value="{$name}" required />
            <span class="required">*</span>
            <div class="kv-error"></div>
          </dd>
        </dl>
        <neq  name="siteid" value="1">
        <dl class="kv" >
          <dt>
            <label>站点目录：</label>
          </dt>
          <dd>
            <input class="input-text" type="text" name="dirname" id="dirname" value="{$dirname}" required
             <notempty name="dirname">readonly</notempty> />
             <span class="required">*</span>
            <div class="kv-error"></div>  
          </dd>
        </dl>
        </neq>
        <dl class="kv">
          <dt>
            <label>站点域名：</label>
          </dt>
          <dd>
            <input class="input-text" type="text" name="domain" value="{$domain}" />
          </dd>
        </dl>
        <dl class="kv">
          <dt>
            <label>站点标题：</label>
          </dt>
          <dd>
            <input class="input-text" type="text" name="site_title" value="{$site_title}" />
          </dd>
        </dl>
        <dl class="kv">
          <dt>
            <label>站点类型：</label>
          </dt>
          <dd>
            <select name="publish" id="publish" class="select">
              <option value="enterprise" <eq name="site_type" value="enterprise">selected</eq>>企业站</option>
              <option value="video" <eq name="site_type" value="video">selected</eq>>影视站</option>
              <option value="news" <eq name="site_type" value="news">selected</eq>>新闻站</option>
            </select>
          </dd>
        </dl>
        <dl class="kv">
            <dt>
                <label>选择模版：</label>
            </dt>
            <dd>
                <select name="selectTemplate" id="selectTemplate" class="select">
                    <option value="">请选择模版</option>
                    <volist name="ds" id="value">
                        <volist name=":array_keys($value)" id="values">
                            <option value="{$values}">{$value[$values]}</option>
                        </volist>
                    </volist>
                </select>
            </dd>
        </dl>
        <dl class="kv">
          <dt>
            <label>关键字：</label>
          </dt>
          <dd>
            <input class="input-text" type="text" name="keywords" value="{$keywords}" />
          </dd>
        </dl>
        <dl class="kv">
          <dt>
            <label>描述：</label>
          </dt>
          <dd>
            <textarea rows="5" cols="100" name="description">{$description}</textarea>
          </dd>
        </dl>
        <div class="actions">
          <input class="btn btn-y" type="submit" value="提交" />
          <input class="btn btn-n" type="button" value="取消" onclick="javascript:window.location.href='{:URL('cms/Site/index')}'" />
        </div>
      </form>
    </div>
  </div>
</body>
</html>
